# -*- coding:utf-8 -*-
from durus.file_storage import FileStorage
from durus.connection import Connection

'''
from yi01lib.Util import db

connection=db.file("hoge.durus")
d=db.dic(connection)

d["hoge"]=〜〜
d["fuga"]=〜〜

connection.commit()
#connection,abort()

'''

def file(filename):
    '''
    filenameにdurusデータベース(filestorage)を作る
    '''
    return Connection(FileStorage(filename))

def dic(durusConnection):
    return durusConnection.get_root()
